package com.forenow.demo.demo16.oop;

public class Test {

    public static void main(String[] args) {
        StuInf stuInf1=new StuInf("tom",18,"nan");
        StuInf stuInf2=new StuInf("caty",20,"nv");
        stuInf1.setName("Bob");
        StuInf[] a=new StuInf[2];
        a[0]=stuInf1;
        a[1]=stuInf2;
        for (StuInf s:a
             ) {
            System.out.println(s.getName()+"---"+s.getAge()+"---"+s.getSex());
        }
    }
}
